<?php
/***********************************************
	This class would check if the article
	title was valid.
************************************************/
class ValidTitleChecker {
	private $titleArray = NULL;
	private $isInteger = NULL;
	
	/************************************************************/
	
	function checkIsTitleValid($title) {
		$this->titleArray = explode(" ", $title);
		
		foreach ($this->titleArray as $individualWord) {
			$this->isInteger = FALSE;
			
			if (is_numeric($individualWord)
				&& $individualWord > 4
				&& $individualWord < 21) {
					$this->isInteger = TRUE;
					return $this->isInteger;
			}
		}
		return $this->isInteger;
	}
}
?>